home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / CMMComponent.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  7.7 KB  |  266 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        CMMComponent.h
  3.  
  4.      Contains:    ColorSync CMM Components
  5.  
  6.      Version:    Technology:    ColorSync 2.1
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc. All rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __CMMCOMPONENT__
  19. #define __CMMCOMPONENT__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __QUICKDRAW__
  25. #include <Quickdraw.h>
  26. #endif
  27. #ifndef __COMPONENTS__
  28. #include <Components.h>
  29. #endif
  30. #ifndef __CMAPPLICATION__
  31. #include <CMApplication.h>
  32. #endif
  33.  
  34.  
  35.  
  36. #if PRAGMA_ONCE
  37. #pragma once
  38. #endif
  39.  
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43.  
  44. #if PRAGMA_IMPORT
  45. #pragma import on
  46. #endif
  47.  
  48. #if PRAGMA_STRUCT_ALIGN
  49.     #pragma options align=mac68k
  50. #elif PRAGMA_STRUCT_PACKPUSH
  51.     #pragma pack(push, 2)
  52. #elif PRAGMA_STRUCT_PACK
  53.     #pragma pack(2)
  54. #endif
  55.  
  56.  
  57. enum {
  58.     CMMInterfaceVersion            = 1
  59. };
  60.  
  61. /* Component function selectors */
  62. /* Required */
  63.  
  64. enum {
  65.     kCMMInit                    = 0,
  66.     kNCMMInit                    = 6,
  67.     kCMMMatchColors                = 1,
  68.     kCMMCheckColors                = 2
  69. };
  70.  
  71. /* Optional */
  72.  
  73. enum {
  74.     kCMMValidateProfile            = 8,
  75.     kCMMFlattenProfile            = 14,
  76.     kCMMUnflattenProfile        = 15,
  77.     kCMMMatchBitmap                = 9,
  78.     kCMMCheckBitmap                = 10,
  79.     kCMMMatchPixMap                = 3,
  80.     kCMMCheckPixMap                = 4,
  81.     kCMMConcatenateProfiles        = 5,
  82.     kCMMConcatInit                = 7,
  83.     kCMMNewLinkProfile            = 16,
  84.     kCMMGetPS2ColorSpace        = 11,
  85.     kCMMGetPS2ColorRenderingIntent = 12,
  86.     kCMMGetPS2ColorRendering    = 13,
  87.     kCMMGetPS2ColorRenderingVMSize = 17,
  88.     kCMMGetNamedColorInfo        = 70,
  89.     kCMMGetNamedColorValue        = 71,
  90.     kCMMGetIndNamedColorValue    = 72,
  91.     kCMMGetNamedColorIndex        = 73,
  92.     kCMMGetNamedColorName        = 74
  93. };
  94.  
  95.  
  96. EXTERN_API( CMError )
  97. NCMInit                            (ComponentInstance         CMSession,
  98.                                  CMProfileRef             srcProfile,
  99.                                  CMProfileRef             dstProfile)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0006, 0x7000, 0xA82A);
  100.  
  101. EXTERN_API( CMError )
  102. CMInit                            (ComponentInstance         CMSession,
  103.                                  CMProfileHandle         srcProfile,
  104.                                  CMProfileHandle         dstProfile)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0000, 0x7000, 0xA82A);
  105.  
  106. EXTERN_API( CMError )
  107. CMMatchColors                    (ComponentInstance         CMSession,
  108.                                  CMColor *                myColors,
  109.                                  unsigned long             count)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x0001, 0x7000, 0xA82A);
  110.  
  111. EXTERN_API( CMError )
  112. CMCheckColors                    (ComponentInstance         CMSession,
  113.                                  CMColor *                myColors,
  114.                                  unsigned long             count,
  115.                                  long *                    result)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0002, 0x7000, 0xA82A);
  116.  
  117.  
  118. /* Optional functions */
  119. EXTERN_API( CMError )
  120. CMMValidateProfile                (ComponentInstance         CMSession,
  121.                                  CMProfileRef             prof,
  122.                                  Boolean *                valid)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
  123.  
  124. EXTERN_API( CMError )
  125. CMMFlattenProfile                (ComponentInstance         CMSession,
  126.                                  CMProfileRef             prof,
  127.                                  unsigned long             flags,
  128.                                  CMFlattenUPP             proc,
  129.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x000E, 0x7000, 0xA82A);
  130.  
  131. EXTERN_API( CMError )
  132. CMMUnflattenProfile                (ComponentInstance         CMSession,
  133.                                  FSSpec *                resultFileSpec,
  134.                                  CMFlattenUPP             proc,
  135.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x000F, 0x7000, 0xA82A);
  136.  
  137. EXTERN_API( CMError )
  138. CMMatchBitmap                    (ComponentInstance         CMSession,
  139.                                  const CMBitmap *        bitmap,
  140.                                  CMBitmapCallBackUPP     progressProc,
  141.                                  void *                    refCon,
  142.                                  CMBitmap *                matchedBitmap)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x0009, 0x7000, 0xA82A);
  143.  
  144. EXTERN_API( CMError )
  145. CMCheckBitmap                    (ComponentInstance         CMSession,
  146.                                  const CMBitmap *        bitmap,
  147.                                  CMBitmapCallBackUPP     progressProc,
  148.                                  void *                    refCon,
  149.                                  CMBitmap *                resultBitmap)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x000A, 0x7000, 0xA82A);
  150.  
  151. EXTERN_API( CMError )
  152. CMMatchPixMap                    (ComponentInstance         CMSession,
  153.                                  PixMap *                myPixMap,
  154.                                  CMBitmapCallBackUPP     progressProc,
  155.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0003, 0x7000, 0xA82A);
  156.  
  157. EXTERN_API( CMError )
  158. CMCheckPixMap                    (ComponentInstance         CMSession,
  159.                                  const PixMap *            myPixMap,
  160.                                  CMBitmapCallBackUPP     progressProc,
  161.                                  BitMap *                myBitMap,
  162.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x0004, 0x7000, 0xA82A);
  163.  
  164. EXTERN_API( CMError )
  165. CMConcatInit                    (ComponentInstance         CMSession,
  166.                                  CMConcatProfileSet *    profileSet)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
  167.  
  168. EXTERN_API( CMError )
  169. CMNewLinkProfile                (ComponentInstance         CMSession,
  170.                                  CMProfileRef *            prof,
  171.                                  const CMProfileLocation * targetLocation,
  172.                                  CMConcatProfileSet *    profileSet)                            FIVEWORDINLINE(0x2F3C, 0x000C, 0x0010, 0x7000, 0xA82A);
  173.  
  174. EXTERN_API( CMError )
  175. CMMGetPS2ColorSpace                (ComponentInstance         CMSession,
  176.                                  CMProfileRef             srcProf,
  177.                                  unsigned long             flags,
  178.                                  CMFlattenUPP             proc,
  179.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x000B, 0x7000, 0xA82A);
  180.  
  181. EXTERN_API( CMError )
  182. CMMGetPS2ColorRenderingIntent    (ComponentInstance         CMSession,
  183.                                  CMProfileRef             srcProf,
  184.                                  unsigned long             flags,
  185.                                  CMFlattenUPP             proc,
  186.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x000C, 0x7000, 0xA82A);
  187.  
  188. EXTERN_API( CMError )
  189. CMMGetPS2ColorRendering            (ComponentInstance         CMSession,
  190.                                  CMProfileRef             srcProf,
  191.                                  CMProfileRef             dstProf,
  192.                                  unsigned long             flags,
  193.                                  CMFlattenUPP             proc,
  194.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0014, 0x000D, 0x7000, 0xA82A);
  195.  
  196. EXTERN_API( CMError )
  197. CMMGetPS2ColorRenderingVMSize    (ComponentInstance         CMSession,
  198.                                  CMProfileRef             srcProf,
  199.                                  CMProfileRef             dstProf,
  200.                                  unsigned long *        vmSize)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0011, 0x7000, 0xA82A);
  201.  
  202. EXTERN_API( CMError )
  203. CMConcatenateProfiles            (ComponentInstance         CMSession,
  204.                                  CMProfileHandle         thru,
  205.                                  CMProfileHandle         dst,
  206.                                  CMProfileHandle *        newDst)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0005, 0x7000, 0xA82A);
  207.  
  208. /* Named Color functions */
  209. EXTERN_API( CMError )
  210. CMMGetNamedColorInfo            (ComponentInstance         CMSession,
  211.                                  CMProfileRef             srcProf,
  212.                                  unsigned long *        deviceChannels,
  213.                                  OSType *                deviceColorSpace,
  214.                                  OSType *                PCSColorSpace,
  215.                                  unsigned long *        count,
  216.                                  StringPtr                 prefix,
  217.                                  StringPtr                 suffix)                                FIVEWORDINLINE(0x2F3C, 0x001C, 0x0046, 0x7000, 0xA82A);
  218.  
  219. EXTERN_API( CMError )
  220. CMMGetNamedColorValue            (ComponentInstance         CMSession,
  221.                                  CMProfileRef             prof,
  222.                                  StringPtr                 name,
  223.                                  CMColor *                deviceColor,
  224.                                  CMColor *                PCSColor)                            FIVEWORDINLINE(0x2F3C, 0x0010, 0x0047, 0x7000, 0xA82A);
  225.  
  226. EXTERN_API( CMError )
  227. CMMGetIndNamedColorValue        (ComponentInstance         CMSession,
  228.                                  CMProfileRef             prof,
  229.                                  unsigned long             index,
  230.                                  CMColor *                deviceColor,
  231.                                  CMColor *                PCSColor)                            FIVEWORDINLINE(0x2F3C, 0x0010, 0x0048, 0x7000, 0xA82A);
  232.  
  233. EXTERN_API( CMError )
  234. CMMGetNamedColorIndex            (ComponentInstance         CMSession,
  235.                                  CMProfileRef             prof,
  236.                                  StringPtr                 name,
  237.                                  unsigned long *        index)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0049, 0x7000, 0xA82A);
  238.  
  239. EXTERN_API( CMError )
  240. CMMGetNamedColorName            (ComponentInstance         CMSession,
  241.                                  CMProfileRef             prof,
  242.                                  unsigned long             index,
  243.                                  StringPtr                 name)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x004A, 0x7000, 0xA82A);
  244.  
  245.  
  246. #if PRAGMA_STRUCT_ALIGN
  247.     #pragma options align=reset
  248. #elif PRAGMA_STRUCT_PACKPUSH
  249.     #pragma pack(pop)
  250. #elif PRAGMA_STRUCT_PACK
  251.     #pragma pack()
  252. #endif
  253.  
  254. #ifdef PRAGMA_IMPORT_OFF
  255. #pragma import off
  256. #elif PRAGMA_IMPORT
  257. #pragma import reset
  258. #endif
  259.  
  260. #ifdef __cplusplus
  261. }
  262. #endif
  263.  
  264. #endif /* __CMMCOMPONENT__ */
  265.  
  266.